import aiml, os

AI = aiml.Kernel()

# load order matters
# more on http://code.google.com/p/aiml-en-us-foundation-alice/wiki/AIMLFileLoadingOrder

AI.learn("reduction0.safe.aiml")
AI.learn("reduction1.safe.aiml")
AI.learn("reduction2.safe.aiml")
AI.learn("reduction3.safe.aiml")
AI.learn("reduction4.safe.aiml")
AI.learn("reductions-update.aiml")

AI.learn("mp0.aiml")
AI.learn("mp1.aiml")
AI.learn("mp2.aiml")
AI.learn("mp3.aiml")
AI.learn("mp4.aiml")
AI.learn("mp5.aiml")
AI.learn("mp6.aiml")


for subdir, dirs, files in os.walk('.'):
	 for file in files:
		if file[-4:] == 'aiml' and file.find('mp') == -1 and file.find('reduction') == -1:
			AI.learn(file)


AI.saveBrain("standard.brn")

# test everything
while True: print AI.respond(raw_input("> "))

